package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysPolicyMapper;
import com.ruoyi.system.domain.SysPolicy;
import com.ruoyi.system.service.ISysPolicyService;
import com.ruoyi.common.core.text.Convert;

/**
 * 慢病政策设置Service业务层处理
 * 
 * @author moweiyu
 * @date 2021-04-30
 */
@Service
public class SysPolicyServiceImpl implements ISysPolicyService 
{
    @Autowired
    private SysPolicyMapper sysPolicyMapper;

    /**
     * 查询慢病政策设置
     * 
     * @param id 慢病政策设置ID
     * @return 慢病政策设置
     */
    @Override
    public SysPolicy selectSysPolicyById(Long id)
    {
        return sysPolicyMapper.selectSysPolicyById(id);
    }

    /**
     * 查询慢病政策设置列表
     * 
     * @param sysPolicy 慢病政策设置
     * @return 慢病政策设置
     */
    @Override
    public List<SysPolicy> selectSysPolicyList(SysPolicy sysPolicy)
    {
        return sysPolicyMapper.selectSysPolicyList(sysPolicy);
    }

    /**
     * 新增慢病政策设置
     * 
     * @param sysPolicy 慢病政策设置
     * @return 结果
     */
    @Override
    public int insertSysPolicy(SysPolicy sysPolicy)
    {
        return sysPolicyMapper.insertSysPolicy(sysPolicy);
    }

    /**
     * 修改慢病政策设置
     * 
     * @param sysPolicy 慢病政策设置
     * @return 结果
     */
    @Override
    public int updateSysPolicy(SysPolicy sysPolicy)
    {
        return sysPolicyMapper.updateSysPolicy(sysPolicy);
    }

    /**
     * 删除慢病政策设置对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteSysPolicyByIds(String ids)
    {
        return sysPolicyMapper.deleteSysPolicyByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除慢病政策设置信息
     * 
     * @param id 慢病政策设置ID
     * @return 结果
     */
    @Override
    public int deleteSysPolicyById(Long id)
    {
        return sysPolicyMapper.deleteSysPolicyById(id);
    }
}
